<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui">

	<ui:composition template="/templates/masterLayout.xhtml">
		<ui:define name="content">
			<h:form id="operatorListFormId">
				<p:dataTable id="operatorDataTableId" value="#{operatorView.dataModel}" selection="#{operatorView.selectedEntities}"
					paginator="true" var="entity" rows="10"
					paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
					lazy="true" paginatorPosition="bottom">
					<p:ajax event="rowDblselect" listener="#{operatorView.editAction}" partialSubmit="true"
						oncomplete="operatorDialog.show()" update=":operatorDetailFormId" />
					<f:facet name="header">
						<p:commandButton icon="ui-icon-plus" value="Tạo mới" action="#{operatorView.newAction}"
							actionListener="#{operatorView.reset}" update=":operatorDetailFormId" oncomplete="operatorDialog.show()"
							style="float:left" />
						<div style="clear: both;" />
					</f:facet>

					<p:column selectionMode="multiple" style="width:1%" />

					<p:column headerText="Tên">
						<h:outputText value="#{entity.user.username}" />
					</p:column>
					<p:column headerText="Email">
						<h:outputText value="#{entity.email}" />
					</p:column>
					<p:column headerText="Trạng thái">
						<h:outputText value="#{entity.state}" />
					</p:column>
					<p:column headerText="Chi nhánh">
						<h:outputText value="#{entity.chiNhanh.name}" />
					</p:column>
					<f:facet name="footer">
					</f:facet>
				</p:dataTable>
			</h:form>

			<ui:include src="operatorDetails.xhtml" />
		</ui:define>
	</ui:composition>


</ui:composition>